/**
 * 事件总线
 * @author: hmc
 * @use Bus.on('name', fn) // 订阅事件
 * @use Bus.emit('name', ...args) // 发布事件
 */
import mitt, { Emitter } from 'mitt'

type Events = Record<string | symbol, any[] | undefined>;

const Bus: Emitter<Events> = mitt<Events>();

export default Bus
